<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    div {
      width: 50px;
      text-align-last: center
    }
    span {
      text-align-last: center
    }
    p {
      text-align: left;
      text-align-last: center;
      width: 100px;
    }
  </style>
</head>
<body>
  <span>dddddddddddddddddddddd<br>dddddddddddddddddddd</span>
  <div>
    fffffffffffffffffffddddddddddddddddddddddddddd
    dddd
    ddd
  </div>
  <p>s</p>
</body>
</html>